/**
 * 
 */
package com.honghao.student.md5;


/**
 * @author honghao.li
 *
 */
public class EncrypetThreadLocal {
    
    private static ThreadLocal<StringEncrypter> encryptor;
    
    public static void init(){
        encryptor = new ThreadLocal<StringEncrypter>(){
            /* (non-Javadoc)
             * @see java.lang.ThreadLocal#initialValue()
             */
            @Override
            protected StringEncrypter initialValue() {
                return new StringEncrypter(IEncrypt.DES_ENCRYPTION_SCHEME, "CHINARAKUTENSEKAINORAKUTEN");
            }
        };
    }
    /**
     * @return the encryptor
     */
    public static ThreadLocal<StringEncrypter> getEncryptor() {
        return encryptor;
    }
}
